package com.hfy.music.controller;

import com.hfy.music.service.DetailMusicService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

/**
 * @ author 韩
 * time: 2024/6/7 17:07
 */
@RestController
@RequestMapping("/detail")
@Tag(name = "用户查询歌曲的详细接口类" ,description = "主要就是对一些元素，是否喜欢，音乐，歌单做详细查询操作")
public class DetailMusicController {
    @Autowired
    private DetailMusicService detailMusicService;

    @GetMapping("/music")
    @Operation(summary = "对歌曲进行详细查询操作")
    @Parameters({@Parameter(name = "musicId", description = "音乐ID"),
                @Parameter(name = "account", description = "用户账号")})
    public Result queryMusicDetail(@RequestParam("musicId") Integer id,@RequestParam("account") Long account){

        return detailMusicService.queryMusicDetail(id,account);
    }




}
